package com.dm.cloud.images.mode;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

@NoArgsConstructor
@AllArgsConstructor
@Schema(description ="应用编排模型")
@Data
public class AppArrangeModel {

    /** 应用ID **/
    @Schema(description = "应用ID")
    private String appCode;
    @Schema(description = "编排方式")
    private List<List<AppArrangeItem>> arranges=new ArrayList<>();

    @NoArgsConstructor
    @AllArgsConstructor
    @Schema(description ="编排项")
    @Data
    public static class AppArrangeItem{
        @Schema(description = "编排项ID")
        private String id;
        /** 完成条件:logRegex_前缀代表监听日志行的正则表达式  time_前缀表示指定时间（秒） **/
        @Schema(description = "完成条件:logRegex_前缀代表监听日志行的正则表达式  time_前缀表示指定时间（秒）")
        private String successCondition;
        /** 容器ID **/
        @Schema(description = "容器ID")
        private String containerId;
        /** 节点ID **/
        @Schema(description = "节点ID")
        private String nodeId;

        @Schema(description = "超时时间:默认120秒")
        private Integer timeout=120;

    }

}
